using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;

namespace ConsoleTest
{
    class Program
    {
        static void Main(string[] args)
        {
            Fanfou.FanfouSession session;

            FileStream stream = new FileStream("session.dat", FileMode.Open);
            try
            {
                BinaryFormatter formatter = new BinaryFormatter();
                session = (Fanfou.FanfouSession)formatter.Deserialize(stream);
                Console.WriteLine(session.Credential.UserName);
            }
            catch
            {
            }

            //================
            Console.Read();
        }
    }
}
